﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class GUI_MasterPage : System.Web.UI.MasterPage
{
     public LanguageManage Language;
    public CategoryAdapter cateAdap;
    public PlatformAdapter platformAdap;
    public List<CategoryEntity> listCategory { set; get; }
    public List<PlatformEntity> platforms { set; get; }
    public string UserName = "";

    public bool isLoginByAdmin = false;
    protected void Page_Load(object sender, EventArgs e)
    {
        UserName = UserManager.Instance.Getuser().Account;
        Language = new LanguageManage();
        cateAdap = new CategoryAdapter();
        platformAdap = new PlatformAdapter();
        listCategory = cateAdap.getListCategories();
        platforms = platformAdap.getListPlatform();
        if (UserManager.Instance.CheckDistributorAdminAuthen())
        {
            isLoginByAdmin = true;
        }
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        Session["conditionsearch"] = comboSearch.SelectedValue;
        Session["keysearch"] = txtSearch.Text.Trim();
        Response.Redirect("~/Home/Search.aspx");
    }
}
